clear; clc; getSession;
%%
zs = sess.getZIServer;
scp = zs.scopeModule('scp');
%%
scp.initialize();
scp.setSamplingRate(ziEnumScopeSamplingRate.Rate15MHz);
scp.setDuration(100e-6);
scp.setMovingAverage(20);

scp.setInput(ziScopeInput.SigIn, ziScopeInput.OscPhi2).enableChannel(ziEnumTwoBitChoice.BOTH);
scp.setTrigger(ziScopeTrigInput.OscPhi2, 'slope', ziEnumTrigEdgeSlope.Positive, 'level', 0);
          
scp.enableTrigger().disableSegment();
scp.enableCh1BWLimit().enableCh2BWLimit();
% 
% scp.setMode('time');
% res = scp.run('shot_number', 200, 'plot_window', 1);

scp.setMode('frequency');
res = scp.run('shot_number', 200, 'plot_window', 2);

